dotConnect for PostgreSQL Documentation
Devart.Data.PostgreSql Namespace / PgSqlArray Structure / PgSqlArray Constructor / PgSqlArray Constructor(PgSqlType,Int32,Int32[])
The type of elements in the array.
The number of dimensions.
Limits for the dimentsions.
Example

In This Topic
    PgSqlArray Constructor(PgSqlType,Int32,Int32[])
    In This Topic
    Initializes a new instance of the PgSqlArray class with the specified element type and dimensions.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal elementType As PgSqlType, _
       ByVal rank As Integer, _
       ByVal ParamArray dimensions() As Integer _
    )
    public PgSqlArray( 
       PgSqlType elementType,
       int rank,
       params int[] dimensions
    )

    Parameters

    elementType
    The type of elements in the array.
    rank
    The number of dimensions.
    dimensions
    Limits for the dimentsions.
    Remarks
    This constructor allows creating any arrays with any rank and any number of elements in any dimension, filled with NULL values.
    Example

    This sample creates two-dimensional array with three sub-arrays, each has two elements. String representation of array that can be received with the ToString method will be the following:

    {{NULL,NULL},{NULL,NULL},{NULL,NULL}}
    
    PgSqlArray arr = new PgSqlArray(PgSqlType.Int, 2,3,2);
    Console.Write(arr);
    Dim arr As PgSqlArray = New PgSqlArray(PgSqlType.Int, 2, 3, 2)
    Console.Write(arr)
    See Also